/*
 *  render.h
 *  BioBreak
 *
 *  Created by terry franguiadakis on 2/19/09.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */

#pragma once
#include "bbmath.h"


struct STexLine  
{
    Vector2f m_LineQuadV[4];
    Vector2f m_LineQuadT[4];
};

class Renderer 
    {
    public:
        enum EAlphaFunc {
            EBarrier, 
            EFull,
            ENone
        };
        
        static void SetAlphaFunc(EAlphaFunc i_alphaFunc = EFull, float i_barrierLevel = 0.0f);
    };

class BasicDrawObjects 
{
public:
    static void DrawPolygon(const  Vector2f* vertices, int i_vertexCount, const Color3f& i_color);
    static void DrawSolidPolygon(const Vector2f* vertices, int i_vertexCount, const Color3f& i_color);
    static void DrawTexturedPolygon(const Vector2f* i_vertices, const Vector2f* i_texcoords, int i_vertexCount, const Color4f i_color);
    
    static void DrawRect(const Vector2f& i_min, const Vector2f& i_max, const Color4f& i_color);
    static void DrawSolidRect(const Vector2f& i_min, const Vector2f& i_max, const Color4f& i_color);
    static void DrawTexturedRect(const Vector2f& i_min, const Vector2f& i_max, const Color4f& i_color, const Vector2f& i_uvMin, const Vector2f& i_uvMax);
   
    static void DrawCircle(const Vector2f& center, float radius, const Color4f& i_color);    
    static void DrawSolidCircle(const Vector2f& center, float radius, const Vector2f& axis, const Color4f& color);
    static void DrawUnitCircle(const Color3f& i_color);
    static void DrawSolidUnitCircle(const Color3f& i_color);
    
    static void DrawSegment(const Vector2f& p1, const Vector2f& p2, const Color3f& color);
    
     
    static void DrawPoint(const Vector2f& p, float size, const Color3f& color);   
    
    
    static STexLine CreateTexLine(const Vector2f& i_from, const Vector2f& i_to, float i_width); 
    static void   DrawTexturedLine(const Vector2f& i_from, const Vector2f& i_to, float i_width, const Color4f i_color);
    
   
};